package com.zzyl.mapper;

import com.zzyl.entity.Resource;
import com.zzyl.vo.MenuVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ResourceMapper {
    /**
     * 根据条件查询资源列表
     * @param resource
     * @return
     */
    List<Resource> list(Resource resource);

    @Select("select * from sys_resource where resource_no = #{parentResourceNo}")
    Resource selectResourceByParentNo(String parentResourceNo);

    void insert(Resource resource);

    List<MenuVo> selectMenuByUserId(Long id);
}
